home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00063.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  608 b   |  20 lines

  1. on exitFrame
  2.   global DA, DB, DC
  3.   set DA to (0.5 * (random(4) - 1)) + 0.5
  4.   set DB to (0.5 * (random(5) - 1)) + 1.0
  5.   set DC to 15.0 * (random(7) - 1)
  6.   set the trails of sprite 12 to 1
  7.   set xA to the left of sprite 5 + 16
  8.   set yA to the bottom of sprite 5 - 47
  9.   set y0 to yA - (22.0 * DA * sin((DB * 0.0) + (DC * PI / 180.0)))
  10.   set x0 to xA
  11.   repeat with n = 1 to 88
  12.     set x to n * 2.0 * PI / 180.0
  13.     set x1 to (n * 2) + xA
  14.     set y1 to yA - (18.0 * DA * sin((DB * x) + (DC * PI / 180.0)))
  15.     set the locH of sprite 12 to x1
  16.     set the locV of sprite 12 to y1
  17.     updateStage()
  18.   end repeat
  19. end
  20.